package com.wenwo.loggingintegrate.controller;

import com.wenwo.annotation.Log;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


/**
 * @program: logging-integrate
 * @className: TestController.java
 * @description:
 * @author: ZY
 * @create: 2020年08月02日 21:27
 **/
@RestController
public class TestController {

    @Log("集成log-starter测试")
    @GetMapping("/test")
    public Map<String, Object> test(String userId, String username) {

        return new HashMap<String, Object>(3){{
            put("code", 200);
            put("msg", "请求成功");
            put("data", new HashMap<String, String>(2){{
                put("userId", userId);
                put("username", username);
            }});
        }};
    }

}
